import React, {Component} from 'react';
import {BrowserRouter, Route,Switch} from 'react-router-dom'
import Login from './pages/login/index'
import Admin from './pages/admin/index'
import Registered from './pages/registered/index'
import FindPassword from './pages/find_your_password/index'
import './App.css';

/*
应用的根组件
*/

export default class App extends Component {
  render() {
    return (
        <BrowserRouter>
          <Switch>{/*只匹配其中一个*/}
            <Route path='/registered' component={Registered}/>
            <Route path='/findpassword' component={FindPassword}/>
            <Route path='/login' component={Login}/>
            <Route path='/' component={Admin} />
          </Switch>
        </BrowserRouter>
    )
  }

}
